package com.dx.weichat.weichat.entity;

import java.util.Date;

/**
 * @author: dx
 * @date: 2018/10/7/0007
 * @description: 文本类型消息
 */
public class TextMsg extends Msg {
	/**消息内容*/
	private String Content;

	public String getContent() {
		return Content;
	}

	public void setContent(String content) {
		Content = content;
	}

	public TextMsg(String content,String FromUserName,String ToUserName) {
		super.FromUserName=FromUserName;
		super.ToUserName=ToUserName;
		super.CreateTime=new Date().getTime();
		super.MsgType= com.dx.weichat.weichat.entity.MsgType.TEXT;
		if("".equals(content))
			Content = "暂无数据";
		else
			Content = content;
	}
	public TextMsg(String content,Msg msg){
		if("".equals(content))
			Content = "暂无数据";
		else
			Content = content;
		super.FromUserName=msg.getToUserName();
		super.ToUserName=msg.getFromUserName();
		super.CreateTime=new Date().getTime();
		super.MsgType= com.dx.weichat.weichat.entity.MsgType.TEXT;
	}
}
